package easyexcel;

import com.alibaba.excel.EasyExcel;

import java.util.ArrayList;
import java.util.List;

public class ExcelWriter {
    public static void main(String[] args) {
        //文件路径
        String fileUrl="D:\\excel_write.xlsx";
        //输入文件的内容
        List<ExcelData> list = new ArrayList<>();
        for (int i = 0; i <10 ; i++) {
            list.add(new ExcelData(i,"拉菲"+i));
        }
        //执行写操作
        EasyExcel.write(fileUrl, ExcelData.class).sheet("学生列表").doWrite(list);
    }
}
